import React from 'react';
import { useTranslation } from 'react-i18next';

interface FullScreenLoadingProps {
  show: boolean;
}

/**
 * 全屏Loading组件
 * 在页面渲染完成之前显示
 */
const FullScreenLoading: React.FC<FullScreenLoadingProps> = ({ show }) => {
  const { t } = useTranslation();
  if (!show) return null;

  return (
    <div className="fixed inset-0 z-50 bg-[rgb(19,19,19)] flex items-center justify-center">
      <div className="text-center">
        {/* Loading动画 */}
        <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-pink-500 mx-auto mb-4"></div>
        {/* Loading文字 */}
        <p className="text-gray-300 text-lg">{t('common.loading')}</p>
      </div>
    </div>
  );
};

export default FullScreenLoading; 